package com.testfileupload.uploadimg.design.simplefactory.chan.product;

public class ConcreateCreator extends Creator{
    @Override
    public <T extends Product> T createProduct(Class<T> c) {
        Product product =null;
        try {
            product = (Product) Class.forName(c.getName()).newInstance();
        } catch (Exception e){
            System.out.println("产品定义失败");
        }
        return (T) product;
    }
}
